-
-
Notifications
You must be signed in to change notification settings - Fork 6k
Squash merge messages contain information about all commits by default. #35247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
fca67b7
to
d328e00
Compare
Please split And it needs tests to cover the changed logic (although old code doesn't have enough tests, new code should have when the logic is complex) |
Let me spend some time researching how to add tests. |
* main: [skip ci] Updated translations via Crowdin Fix LFS range size header response (go-gitea#35277) Skip "parentsigned" check when the repo is empty (go-gitea#35292) [skip ci] Updated translations via Crowdin Fix GitHub release assets URL validation (go-gitea#35287) nix flake use go1.25 (go-gitea#35288) go1.25.0 (go-gitea#35262)
@hiifong Thanks for your contribution. Any progress on this? |
* main: (34 commits) when sorting issues by nearest due date, issues without due date should be sorted ascending (go-gitea#35267) [skip ci] Updated translations via Crowdin Upgrade xz to v0.5.15 (go-gitea#35377) Refactor db package (go-gitea#35380) Remove the duplicated function GetTags (go-gitea#35375) [skip ci] Updated translations via Crowdin Allow foreachref parser to grow its buffer (go-gitea#35365) Remove global context from db package (go-gitea#35371) Use gitrepo.SetDefaultBranch when set default branch of wiki repository (go-gitea#33911) Deleting branch could delete broken branch which has database record but git branch is missing (go-gitea#35360) Remove incorrect "db.DefaultContext" usages (go-gitea#35366) Refactor to use reflect.TypeFor (go-gitea#35370) [skip ci] Updated translations via Crowdin Remove wrong "git.DefaultContext" (go-gitea#35364) Fix context usages (go-gitea#35348) Instance signing rule `pubkey` should allow all public keys, not just GPG (go-gitea#35357) Allow deleting comment with content via API like web did (go-gitea#35346) Prevent duplicate actions email (go-gitea#35215) rename nightly docker tag for main branch (go-gitea#35344) Fix atom/rss mixed error (go-gitea#35345) ... # Conflicts: # tests/integration/pull_merge_test.go
already for review |
1040c84
to
099ccf2
Compare
* main: [skip ci] Updated translations via Crowdin Use github.com/mholt/archives replace github.com/mholt/archiver (go-gitea#35390) Move some functions from package git to gitrepo (go-gitea#33910) Move git config/remote to gitrepo package and add global lock to resolve possible conflict when updating repository git config file (go-gitea#35151) Move HasWiki to repository service package (go-gitea#33912) Rename UpdateBranch API to RenameBranch API (go-gitea#35374)
ctx.Data["DefaultSquashMergeMessage"] = defaultSquashMergeMessage | ||
ctx.Data["DefaultSquashMergeBody"] = defaultSquashMergeBody | ||
ctx.Data["DefaultSquashMergeBody"] = fmt.Sprintf("--------------------\n%s%s", commitsBuilder.String(), defaultSquashMergeBody) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The --------------------\n
should be ignored if the pull request body is empty.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done b09ada6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it still needs more tests, to test various edge cases.
The test can clearly test this function's logic.
The existing tests in this PR (parse HTML pages) seem quite fragile and difficult to read. I guess you will also have difficulty to understand your code after 3 months.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll continue to refine this pr over the weekend
This behavior is basically the same as GitHub, except for the dividing line I added.
screenshot: